<?php
use Illuminate\Support\Facades\Route;



Route::group(['namespace'=>'login'],function (){
    //登录
    Route::get('login',[\App\Http\Controllers\login\LoginController::class,'loginPage']);

    //实现登录
    Route::post('doLogin',[\App\Http\Controllers\login\LoginController::class,'doLogin']);

    Route::get('login',[\App\Http\Controllers\login\LoginController::class,'loginPage'])->name('login');
    //实现登录
    Route::post('doLogin',[\App\Http\Controllers\login\LoginController::class,'doLogin']);
//    退出登录
    Route::get('logout',[\App\Http\Controllers\login\LoginController::class,'logout'])->name('logout');

});

Route::group(['namespace'=>'login','middleware'=>'login'],function (){
//首页
    Route::get('index',[\App\Http\Controllers\login\IndexController::class,'index']);
//欢迎页面
    Route::get('welcome',[\App\Http\Controllers\login\IndexController::class,'welcome']);
});
